package com.syni.mdd.sjb.common.component.utils.feign.service.mddAll;

import com.syni.mdd.sjb.common.component.utils.feign.constants.Constants;
import com.syni.mdd.sjb.common.component.utils.feign.dto.mddAll.apiBusiness.*;
import com.syni.mdd.sjb.common.component.utils.common.utils.RpcResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @className BusinessInfoRestService
 * @description TOO
 * @Author cfx
 * @DATE 2020/4/6 22:19
 * @VERSION 1.0
 **/
@FeignClient(value = Constants.MDD_DSP_API,path = Constants.MDD_DSP_API_PATH)
@RequestMapping("/apiBusiness")
public interface BusinessRestService {
    @GetMapping("/getBusinessEarnings")
    RpcResponseVo getBusinessEarnings(@RequestParam("userId") Integer userId);

    @PostMapping("/getMddBusinessDataByDxshApp")
    RpcResponseVo getMddBusinessDataByDxshApp(@RequestBody GetMddBusinessDataByDxshAppDto getMddBusinessDataByDxshAppDto);

    @GetMapping("/getCanClaimBusiness")
    RpcResponseVo getCanClaimBusiness(@RequestParam("addrProvince") String addrProvince,
                                      @RequestParam("addrCity") String addrCity,
                             @RequestParam("searchText") String searchText,
                             @RequestParam(value = "typeName",required = false) String typeName,
                             @RequestParam("pageNum") Integer pageNum,
                             @RequestParam("pageSize") Integer pageSize);

    @GetMapping("/getCanClaimBusinessNoTypeName")
    RpcResponseVo getCanClaimBusinessNoTypeName(@RequestParam("addrProvince") String addrProvince,
                                      @RequestParam("addrCity") String addrCity,
                                      @RequestParam("searchText") String searchText,
                                      @RequestParam("pageNum") Integer pageNum,
                                      @RequestParam("pageSize") Integer pageSize);

    @PostMapping("/claimBusiness")
    RpcResponseVo claimBusiness(@RequestBody ClaimBusinessDto claimBusinessDto);

    @PostMapping("/claimBusiness/v2")
    RpcResponseVo claimBusiness_v2(@RequestBody ClaimBusinessDto claimBusinessDto);

    //聚合参数
    @PostMapping("/certificationBusiness")
    RpcResponseVo certificationBusiness(@RequestBody CertificationBusinessDto certificationBusinessDto);

    //聚合参数
    @PostMapping("/mddCertification")
    RpcResponseVo mddCertification(@RequestBody CertificationBusinessDto certificationBusinessDto);

    @GetMapping("/getUserClaimBusiness")
    RpcResponseVo getUserClaimBusiness(@RequestParam("userId") Integer userId,@RequestParam("isSearchCert") Integer isSearchCert);

    @PostMapping("/createBusiness")
    RpcResponseVo createBusiness(@RequestBody CreateBusinessDto createBusinessDto);

    @PostMapping("/getBusinessById")
    RpcResponseVo getBusinessById(@RequestBody GetBusinessDataByIdDto getBusinessDataByIdDto);

    @PostMapping("/getBusinessByIds")
    RpcResponseVo getBusinessByIds(@RequestBody GetBusinessDataByIdsDto getBusinessDataByIdsDto);

    @PostMapping("/updateBusiness")
    RpcResponseVo updateBusiness(UpdateBusinessDto updateBusinessDto);

    @GetMapping("/getBusinessAuthByBusinessId")
    RpcResponseVo getBusinessAuthByBusinessId(@RequestParam("businessId") Integer businessId);
}
